CC = gcc
CFLAGS = -Wall -O2
LIBS = -lcfitsio -lm

TARGET = fits_write_pix_row_by_row
SOURCE = fits_write_pix_row_by_row.c

$(TARGET): $(SOURCE)
	$(CC) $(CFLAGS) -o $(TARGET) $(SOURCE) $(LIBS)

clean:
	rm -f $(TARGET)

.PHONY: clean 